Optical recognition (OCR) refers to conversion of an image of a physical (e.g., typewritten or printed) document into machine-encoded text characters. The collection of converted machine-encoded text characters is referred to as a textual content of the physical document. The textual content may be un-structured without any specific format, or structured based on a pre-determined format of the physical document. As used herein, the term “format” refers to a specification of pre-defined field(s) of the physical document and associated locations within the physical document.
An optical recognition (OCR) engine is a software and/or hardware tool used to extract the structured textual content from a document image that mimics the physical document. Generally, the OCR engine requires an OCR template that specifies a relationship between location(s) on a particular type of physical document and pre-defined field(s) of the particular type of physical document. Based on the OCR template, the OCR engine extracts a value for each of the pre-defined fields from a corresponding location within the document image. For example, the OCR engine for a check requires the information indicating where the MICR (i.e., Magnetic Ink Character Recognition) number is located on different types of check to generate an accurate structured textual content for each type of check. In another example, many OCR engines for processing receipts rely on some level of manual user intervention because receipts have very different formats for different vendors.